import { useRef } from 'react';

export default function RefNotTraceCounter() {
  let ref = useRef(0);
  // console.log('不会进行重新渲染');

  function handleClick() {
    ref.current = ref.current + 1;
    alert('你点击了 ' + ref.current + ' 次!');
  }
  return <button onClick={handleClick}>点我! 点击了{ref.current}次</button>;
}
